class Tallnut extends GuaAnimation {
    static new(game) {
        let p = new this(game, animationTallnut)
        p.setup()
        return p
    }

    setup() {
        // row表示在草地的第几排
        this.row = -1
        this.cooldown = 5
        this.score = 150
        this.hp = 15
    }

    cracked() {
        if (this.hp > 5 && this.hp < 10) {
            this.changeAnimation('cracked1')
        }
        if (this.hp < 5) {
            this.changeAnimation('cracked2')

        }
    }

    update() {
        super.update()
        this.cracked()
    }
}